#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>

using namespace std;

void Test1()
{
    int _max = 0, m = 0;
    int n = 0, x = 0;
    cin >> n;
    vector<int> a;
    for (int i = 0; i < n; i++)
    {
        cin >> x;
        a.push_back(x);
    }
    for (int i = 1; i < a.size(); i++)
    {
        if (a[i] - a[m] <= 0)
        {
            m = i;
        }
        else
        {
            _max = max(_max, a[i] - a[m]);
        }
    }

    cout << _max << endl;
}



int main()
{
        int  a, b, n, m;
        vector<vector<int>> dp;
        cin >> a >> b >> n >> m;
        vector<int> tmp;
        for (int i = 0; i < b; i++)
        {
            tmp.push_back(0);
        }
        for (int i = 0; i < a; i++)
        {
            dp.push_back(tmp);
        }

        for (int i = 0; i < a; i++)
        {
            dp[0][i] = 1;
        }
        for (int i = 0; i < b; i++)
        {
            dp[i][0] = 1;
        }
        for (int k = 0; k < 4; k++)
        {
            int x = n + dx[k], y = m + dy[k];
            if (x >= 0 && x < a && y >= 0 && y < b)
            {
                dp[x][y] = -1;
            }
        }

        for (int i = 1; i < a; i++)
        {
            if (dp[0][i - 1] == -1)
            {
                dp[0][i] = -1;
            }
        }
        for (int i = 1; i < b; i++)
        {
            if (dp[i - 1][0] == -1)
            {
                dp[i][0] = -1;
            }
        }

        dp[n][m] = -1;

        for (int i = 1; i < a; i++)
        {
            for (int j = 1; j < b; j++)
            {
                if (dp[i][j] != -1)
                {
                    if (dp[i - 1][j] == -1)
                    {
                        dp[i][j] += dp[i][j - 1];
                    }
                    else if (dp[i][j - 1] == -1)
                    {
                        dp[i][j] += dp[i - 1][j];
                    }
                    else if (dp[i - 1][j] == -1 && dp[i][j - 1] == -1)
                    {
                        dp[i][j] = 0;
                    }
                    else
                    {
                        dp[i][j] += dp[i - 1][j] + dp[i][j - 1];
                    }
                }
            }
        }
        cout << dp[a - 1][b - 1];
    }